﻿//Copyright (c) Microsoft Corporation. All rights reserved.

namespace Microsoft.Ted.Wacel.Redis
{
    public class Queue<T>: Base.Queue<T>
    {
        public Queue(string name, string hostName, int port = 6379)
            :this(name, long.MaxValue-1, hostName, port)
        {
        }
        public Queue(string name, long maxLength, string hostName, int port = 6379, string password = null)
            : base(name, maxLength,
                 new RedisCacheProvider(new BookSleeve.RedisConnection(hostName, port, allowAdmin: true, password:password), name),
                    new RedisLockProvider(new BookSleeve.RedisConnection(hostName, port, allowAdmin: true, password:password), name + ":lock"))
        {

        }
    }
}
